package com.cff.shorturl.task;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;

public class TreadManager {
	static ExecutorService executorService = Executors.newCachedThreadPool();
	
	public static CallbackTask submit(CallbackTask task){
		Future<String> future = executorService.submit(task);
		task.setResult(future);
		return task;
	}
}
